\hypertarget{class_q_c_p_financial}{}\section{Q\+C\+P\+Financial Class Reference}
\label{class_q_c_p_financial}\index{Q\+C\+P\+Financial@{Q\+C\+P\+Financial}}


A plottable representing a financial stock chart.  


Inheritance diagram for Q\+C\+P\+Financial\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=4.000000cm]{class_q_c_p_financial}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
enum \mbox{\hyperlink{class_q_c_p_financial_a0f800e21ee98d646dfc6f8f89d10ebfb}{Chart\+Style}} \{ \mbox{\hyperlink{class_q_c_p_financial_a0f800e21ee98d646dfc6f8f89d10ebfba3a516016c9298d3e95dd82aa203c4390}{cs\+Ohlc}}, 
\mbox{\hyperlink{class_q_c_p_financial_a0f800e21ee98d646dfc6f8f89d10ebfbac803cbd39f26e3f206bcc7028679e62f}{cs\+Candlestick}}
 \}
\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{class_q_c_p_financial_a4702d5248feeb9d1ec6e3ce725b10b32}{Q\+C\+P\+Financial}} (\mbox{\hyperlink{class_q_c_p_axis}{Q\+C\+P\+Axis}} $\ast$key\+Axis, \mbox{\hyperlink{class_q_c_p_axis}{Q\+C\+P\+Axis}} $\ast$value\+Axis)
\item 
\mbox{\hyperlink{qcustomplot_8h_a745c09823fae0974b50beca9bc3b3d7d}{Q\+C\+P\+Financial\+Data\+Map}} $\ast$ \mbox{\hyperlink{class_q_c_p_financial_a528c81578e4f25999a9169127763cfd4}{data}} () const
\item 
\mbox{\Hypertarget{class_q_c_p_financial_a5243371c1fde30fdae00555d7760ec2d}\label{class_q_c_p_financial_a5243371c1fde30fdae00555d7760ec2d}} 
\mbox{\hyperlink{class_q_c_p_financial_a0f800e21ee98d646dfc6f8f89d10ebfb}{Chart\+Style}} {\bfseries chart\+Style} () const
\item 
\mbox{\Hypertarget{class_q_c_p_financial_a12548f13658eda5833204ef60f524870}\label{class_q_c_p_financial_a12548f13658eda5833204ef60f524870}} 
double {\bfseries width} () const
\item 
\mbox{\Hypertarget{class_q_c_p_financial_afd4b51de5be8e53776b649f9877a50e6}\label{class_q_c_p_financial_afd4b51de5be8e53776b649f9877a50e6}} 
bool {\bfseries two\+Colored} () const
\item 
\mbox{\Hypertarget{class_q_c_p_financial_ae922e75f3d5b8854369ac0bf1ebfb053}\label{class_q_c_p_financial_ae922e75f3d5b8854369ac0bf1ebfb053}} 
Q\+Brush {\bfseries brush\+Positive} () const
\item 
\mbox{\Hypertarget{class_q_c_p_financial_ad4fdc5bc21f5eb17070e043bd4a35f53}\label{class_q_c_p_financial_ad4fdc5bc21f5eb17070e043bd4a35f53}} 
Q\+Brush {\bfseries brush\+Negative} () const
\item 
\mbox{\Hypertarget{class_q_c_p_financial_ae803fe25fdd6f0acacde4539590795ed}\label{class_q_c_p_financial_ae803fe25fdd6f0acacde4539590795ed}} 
Q\+Pen {\bfseries pen\+Positive} () const
\item 
\mbox{\Hypertarget{class_q_c_p_financial_a25d9a8f256e5ddcba56b6e2e7e968653}\label{class_q_c_p_financial_a25d9a8f256e5ddcba56b6e2e7e968653}} 
Q\+Pen {\bfseries pen\+Negative} () const
\item 
void \mbox{\hyperlink{class_q_c_p_financial_adf12a86082f1e488df6a4e8603f8fd6d}{set\+Data}} (\mbox{\hyperlink{qcustomplot_8h_a745c09823fae0974b50beca9bc3b3d7d}{Q\+C\+P\+Financial\+Data\+Map}} $\ast$\mbox{\hyperlink{class_q_c_p_financial_a528c81578e4f25999a9169127763cfd4}{data}}, bool copy=false)
\item 
void \mbox{\hyperlink{class_q_c_p_financial_a886881339d6447432af55adaad748c3c}{set\+Data}} (const Q\+Vector$<$ double $>$ \&key, const Q\+Vector$<$ double $>$ \&open, const Q\+Vector$<$ double $>$ \&high, const Q\+Vector$<$ double $>$ \&low, const Q\+Vector$<$ double $>$ \&close)
\item 
void \mbox{\hyperlink{class_q_c_p_financial_a5a59175d36279d71596e64d7bb65596f}{set\+Chart\+Style}} (\mbox{\hyperlink{class_q_c_p_financial_a0f800e21ee98d646dfc6f8f89d10ebfb}{Chart\+Style}} style)
\item 
void \mbox{\hyperlink{class_q_c_p_financial_a99633f8bac86a61d534ae5eeb1a3068f}{set\+Width}} (double width)
\item 
void \mbox{\hyperlink{class_q_c_p_financial_a138e44aac160a17a9676652e240c5f08}{set\+Two\+Colored}} (bool two\+Colored)
\item 
void \mbox{\hyperlink{class_q_c_p_financial_a5ebff2b1764efd07cc44942e67821829}{set\+Brush\+Positive}} (const Q\+Brush \&brush)
\item 
void \mbox{\hyperlink{class_q_c_p_financial_a8bbdd87629f9144b3ef51af660c0961a}{set\+Brush\+Negative}} (const Q\+Brush \&brush)
\item 
void \mbox{\hyperlink{class_q_c_p_financial_ac58aa3adc7a35aab0088764b840683e5}{set\+Pen\+Positive}} (const Q\+Pen \&pen)
\item 
void \mbox{\hyperlink{class_q_c_p_financial_afe5c07e94ccea01a75b3a2476993c346}{set\+Pen\+Negative}} (const Q\+Pen \&pen)
\item 
void \mbox{\hyperlink{class_q_c_p_financial_a1a83396f97fcc68f2b7aa8d9782feffe}{add\+Data}} (const \mbox{\hyperlink{qcustomplot_8h_a745c09823fae0974b50beca9bc3b3d7d}{Q\+C\+P\+Financial\+Data\+Map}} \&data\+Map)
\item 
void \mbox{\hyperlink{class_q_c_p_financial_a3b6144b48a6a8e63236fc5bf70d40c00}{add\+Data}} (const \mbox{\hyperlink{class_q_c_p_financial_data}{Q\+C\+P\+Financial\+Data}} \&\mbox{\hyperlink{class_q_c_p_financial_a528c81578e4f25999a9169127763cfd4}{data}})
\item 
void \mbox{\hyperlink{class_q_c_p_financial_a688bbd052e00a02954ddb0068b378170}{add\+Data}} (double key, double open, double high, double low, double close)
\item 
void \mbox{\hyperlink{class_q_c_p_financial_aa1abe3bdafb297497f09cdbdc4db3958}{add\+Data}} (const Q\+Vector$<$ double $>$ \&key, const Q\+Vector$<$ double $>$ \&open, const Q\+Vector$<$ double $>$ \&high, const Q\+Vector$<$ double $>$ \&low, const Q\+Vector$<$ double $>$ \&close)
\item 
void \mbox{\hyperlink{class_q_c_p_financial_a097c0383c7c1e9042ca7f93cb439d15a}{remove\+Data\+Before}} (double key)
\item 
void \mbox{\hyperlink{class_q_c_p_financial_aa0fcd357005288c833a230c7874825ba}{remove\+Data\+After}} (double key)
\item 
void \mbox{\hyperlink{class_q_c_p_financial_a048c741d3c8cc5709c2c44b759fdf27c}{remove\+Data}} (double from\+Key, double to\+Key)
\item 
void \mbox{\hyperlink{class_q_c_p_financial_ae527d8a11290906b083d1ab598c380ea}{remove\+Data}} (double key)
\item 
virtual void \mbox{\hyperlink{class_q_c_p_financial_a11fd49928c33e55e27b7319c6927864a}{clear\+Data}} ()
\item 
virtual double \mbox{\hyperlink{class_q_c_p_financial_a77bffad8f3fcbcccbef03ead1c538e3a}{select\+Test}} (const Q\+PointF \&pos, bool only\+Selectable, Q\+Variant $\ast$details=0) const
\end{DoxyCompactItemize}
\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
static \mbox{\hyperlink{qcustomplot_8h_a745c09823fae0974b50beca9bc3b3d7d}{Q\+C\+P\+Financial\+Data\+Map}} \mbox{\hyperlink{class_q_c_p_financial_a0c3453d1c03e320950fdd2df54e3ebc8}{time\+Series\+To\+Ohlc}} (const Q\+Vector$<$ double $>$ \&time, const Q\+Vector$<$ double $>$ \&value, double time\+Bin\+Size, double time\+Bin\+Offset=0)
\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{class_q_c_p_financial_ad71a59a1b42616594831e04e52c92120}\label{class_q_c_p_financial_ad71a59a1b42616594831e04e52c92120}} 
virtual void {\bfseries draw} (\mbox{\hyperlink{class_q_c_p_painter}{Q\+C\+P\+Painter}} $\ast$painter)
\item 
\mbox{\Hypertarget{class_q_c_p_financial_a474a3994b081892f1dbdd1162e055b96}\label{class_q_c_p_financial_a474a3994b081892f1dbdd1162e055b96}} 
virtual void {\bfseries draw\+Legend\+Icon} (\mbox{\hyperlink{class_q_c_p_painter}{Q\+C\+P\+Painter}} $\ast$painter, const Q\+RectF \&rect) const
\item 
\mbox{\Hypertarget{class_q_c_p_financial_a13da88ffd42ad192a672d54f3f233d15}\label{class_q_c_p_financial_a13da88ffd42ad192a672d54f3f233d15}} 
virtual \mbox{\hyperlink{class_q_c_p_range}{Q\+C\+P\+Range}} {\bfseries get\+Key\+Range} (bool \&found\+Range, \mbox{\hyperlink{class_q_c_p_abstract_plottable_a661743478a1d3c09d28ec2711d7653d8}{Sign\+Domain}} in\+Sign\+Domain=\mbox{\hyperlink{class_q_c_p_abstract_plottable_a661743478a1d3c09d28ec2711d7653d8a082b98cfb91a7363a3b5cd17b0c1cd60}{sd\+Both}}) const
\item 
\mbox{\Hypertarget{class_q_c_p_financial_a91c698076647d58223f49e7248d1487e}\label{class_q_c_p_financial_a91c698076647d58223f49e7248d1487e}} 
virtual \mbox{\hyperlink{class_q_c_p_range}{Q\+C\+P\+Range}} {\bfseries get\+Value\+Range} (bool \&found\+Range, \mbox{\hyperlink{class_q_c_p_abstract_plottable_a661743478a1d3c09d28ec2711d7653d8}{Sign\+Domain}} in\+Sign\+Domain=\mbox{\hyperlink{class_q_c_p_abstract_plottable_a661743478a1d3c09d28ec2711d7653d8a082b98cfb91a7363a3b5cd17b0c1cd60}{sd\+Both}}) const
\item 
\mbox{\Hypertarget{class_q_c_p_financial_a3c3007a7434e29d042c77ccf4f497e66}\label{class_q_c_p_financial_a3c3007a7434e29d042c77ccf4f497e66}} 
void {\bfseries draw\+Ohlc\+Plot} (\mbox{\hyperlink{class_q_c_p_painter}{Q\+C\+P\+Painter}} $\ast$painter, const Q\+C\+P\+Financial\+Data\+Map\+::const\+\_\+iterator \&begin, const Q\+C\+P\+Financial\+Data\+Map\+::const\+\_\+iterator \&end)
\item 
\mbox{\Hypertarget{class_q_c_p_financial_a71f5081da0e5ab9c40a488ad40cff122}\label{class_q_c_p_financial_a71f5081da0e5ab9c40a488ad40cff122}} 
void {\bfseries draw\+Candlestick\+Plot} (\mbox{\hyperlink{class_q_c_p_painter}{Q\+C\+P\+Painter}} $\ast$painter, const Q\+C\+P\+Financial\+Data\+Map\+::const\+\_\+iterator \&begin, const Q\+C\+P\+Financial\+Data\+Map\+::const\+\_\+iterator \&end)
\item 
\mbox{\Hypertarget{class_q_c_p_financial_a9df2d86e6ad3b58b51798d720e0f4739}\label{class_q_c_p_financial_a9df2d86e6ad3b58b51798d720e0f4739}} 
double {\bfseries ohlc\+Select\+Test} (const Q\+PointF \&pos, const Q\+C\+P\+Financial\+Data\+Map\+::const\+\_\+iterator \&begin, const Q\+C\+P\+Financial\+Data\+Map\+::const\+\_\+iterator \&end) const
\item 
\mbox{\Hypertarget{class_q_c_p_financial_a6fa1e18f18b37d3a0502b97d864a6d15}\label{class_q_c_p_financial_a6fa1e18f18b37d3a0502b97d864a6d15}} 
double {\bfseries candlestick\+Select\+Test} (const Q\+PointF \&pos, const Q\+C\+P\+Financial\+Data\+Map\+::const\+\_\+iterator \&begin, const Q\+C\+P\+Financial\+Data\+Map\+::const\+\_\+iterator \&end) const
\item 
\mbox{\Hypertarget{class_q_c_p_financial_ab74167a55319771c5da0e06406c2c2f2}\label{class_q_c_p_financial_ab74167a55319771c5da0e06406c2c2f2}} 
void {\bfseries get\+Visible\+Data\+Bounds} (Q\+C\+P\+Financial\+Data\+Map\+::const\+\_\+iterator \&lower, Q\+C\+P\+Financial\+Data\+Map\+::const\+\_\+iterator \&upper) const
\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{class_q_c_p_financial_a475f63587ca1077d8c30aaf2b71ae026}\label{class_q_c_p_financial_a475f63587ca1077d8c30aaf2b71ae026}} 
\mbox{\hyperlink{qcustomplot_8h_a745c09823fae0974b50beca9bc3b3d7d}{Q\+C\+P\+Financial\+Data\+Map}} $\ast$ {\bfseries m\+Data}
\item 
\mbox{\Hypertarget{class_q_c_p_financial_ab65c2ce8d6354451870bb44b894c1e92}\label{class_q_c_p_financial_ab65c2ce8d6354451870bb44b894c1e92}} 
\mbox{\hyperlink{class_q_c_p_financial_a0f800e21ee98d646dfc6f8f89d10ebfb}{Chart\+Style}} {\bfseries m\+Chart\+Style}
\item 
\mbox{\Hypertarget{class_q_c_p_financial_af630e5eb8485146b9c777e63fd1cf993}\label{class_q_c_p_financial_af630e5eb8485146b9c777e63fd1cf993}} 
double {\bfseries m\+Width}
\item 
\mbox{\Hypertarget{class_q_c_p_financial_a6afe919190b884d9bac026cefcc8c0a8}\label{class_q_c_p_financial_a6afe919190b884d9bac026cefcc8c0a8}} 
bool {\bfseries m\+Two\+Colored}
\item 
\mbox{\Hypertarget{class_q_c_p_financial_ab7e6eed16260a2f88ca6bd940dffea79}\label{class_q_c_p_financial_ab7e6eed16260a2f88ca6bd940dffea79}} 
Q\+Brush {\bfseries m\+Brush\+Positive}
\item 
\mbox{\Hypertarget{class_q_c_p_financial_acb0e31874b7a1deb56bd42e8ab3e68f2}\label{class_q_c_p_financial_acb0e31874b7a1deb56bd42e8ab3e68f2}} 
Q\+Brush {\bfseries m\+Brush\+Negative}
\item 
\mbox{\Hypertarget{class_q_c_p_financial_aa6599186f417ba615caebb3f6c762bd8}\label{class_q_c_p_financial_aa6599186f417ba615caebb3f6c762bd8}} 
Q\+Pen {\bfseries m\+Pen\+Positive}
\item 
\mbox{\Hypertarget{class_q_c_p_financial_a263fbfefde2cc19c8d4024a8319c2bbb}\label{class_q_c_p_financial_a263fbfefde2cc19c8d4024a8319c2bbb}} 
Q\+Pen {\bfseries m\+Pen\+Negative}
\end{DoxyCompactItemize}
\subsection*{Friends}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{class_q_c_p_financial_a1cdf9df76adcfae45261690aa0ca2198}\label{class_q_c_p_financial_a1cdf9df76adcfae45261690aa0ca2198}} 
class {\bfseries Q\+Custom\+Plot}
\item 
\mbox{\Hypertarget{class_q_c_p_financial_a8429035e7adfbd7f05805a6530ad5e3b}\label{class_q_c_p_financial_a8429035e7adfbd7f05805a6530ad5e3b}} 
class {\bfseries Q\+C\+P\+Legend}
\end{DoxyCompactItemize}
\subsection*{Additional Inherited Members}


\subsection{Detailed Description}
A plottable representing a financial stock chart. 



This plottable represents time series data binned to certain intervals, mainly used for stock charts. The two common representations O\+H\+LC (Open-\/\+High-\/\+Low-\/\+Close) bars and Candlesticks can be set via \mbox{\hyperlink{class_q_c_p_financial_a5a59175d36279d71596e64d7bb65596f}{set\+Chart\+Style}}.

The data is passed via \mbox{\hyperlink{class_q_c_p_financial_adf12a86082f1e488df6a4e8603f8fd6d}{set\+Data}} as a set of open/high/low/close values at certain keys (typically times). This means the data must be already binned appropriately. If data is only available as a series of values (e.\+g. {\itshape price} against {\itshape time}), you can use the static convenience function \mbox{\hyperlink{class_q_c_p_financial_a0c3453d1c03e320950fdd2df54e3ebc8}{time\+Series\+To\+Ohlc}} to generate binned O\+H\+L\+C-\/data which can then be passed to \mbox{\hyperlink{class_q_c_p_financial_adf12a86082f1e488df6a4e8603f8fd6d}{set\+Data}}.

The width of the O\+H\+LC bars/candlesticks can be controlled with \mbox{\hyperlink{class_q_c_p_financial_a99633f8bac86a61d534ae5eeb1a3068f}{set\+Width}} and is given in plot key coordinates. A typical choice is to set it to (or slightly less than) one bin interval width.\hypertarget{class_q_c_p_statistical_box_appearance}{}\subsection{Changing the appearance}\label{class_q_c_p_statistical_box_appearance}
Charts can be either single-\/ or two-\/colored (\mbox{\hyperlink{class_q_c_p_financial_a138e44aac160a17a9676652e240c5f08}{set\+Two\+Colored}}). If set to be single-\/colored, lines are drawn with the plottable\textquotesingle{}s pen (\mbox{\hyperlink{class_q_c_p_abstract_plottable_ab74b09ae4c0e7e13142fe4b5bf46cac7}{set\+Pen}}) and fills with the brush (\mbox{\hyperlink{class_q_c_p_abstract_plottable_a7a4b92144dca6453a1f0f210e27edc74}{set\+Brush}}).

If set to two-\/colored, positive changes of the value during an interval ({\itshape close} $>$= {\itshape open}) are represented with a different pen and brush than negative changes ({\itshape close} $<$ {\itshape open}). These can be configured with \mbox{\hyperlink{class_q_c_p_financial_ac58aa3adc7a35aab0088764b840683e5}{set\+Pen\+Positive}}, \mbox{\hyperlink{class_q_c_p_financial_afe5c07e94ccea01a75b3a2476993c346}{set\+Pen\+Negative}}, \mbox{\hyperlink{class_q_c_p_financial_a5ebff2b1764efd07cc44942e67821829}{set\+Brush\+Positive}}, and \mbox{\hyperlink{class_q_c_p_financial_a8bbdd87629f9144b3ef51af660c0961a}{set\+Brush\+Negative}}. In two-\/colored mode, the normal plottable pen/brush is ignored. Upon selection however, the normal selected pen/brush (\mbox{\hyperlink{class_q_c_p_abstract_plottable_a6911603cad23ab0469b108224517516f}{set\+Selected\+Pen}}, \mbox{\hyperlink{class_q_c_p_abstract_plottable_ae8c816874089f7a44001e8618e81a9dc}{set\+Selected\+Brush}}) is used, irrespective of whether the chart is single-\/ or two-\/colored. 

\subsection{Member Enumeration Documentation}
\mbox{\Hypertarget{class_q_c_p_financial_a0f800e21ee98d646dfc6f8f89d10ebfb}\label{class_q_c_p_financial_a0f800e21ee98d646dfc6f8f89d10ebfb}} 
\index{Q\+C\+P\+Financial@{Q\+C\+P\+Financial}!Chart\+Style@{Chart\+Style}}
\index{Chart\+Style@{Chart\+Style}!Q\+C\+P\+Financial@{Q\+C\+P\+Financial}}
\subsubsection{\texorpdfstring{Chart\+Style}{ChartStyle}}
{\footnotesize\ttfamily enum \mbox{\hyperlink{class_q_c_p_financial_a0f800e21ee98d646dfc6f8f89d10ebfb}{Q\+C\+P\+Financial\+::\+Chart\+Style}}}

Defines the possible representations of O\+H\+LC data in the plot.

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_q_c_p_financial_a5a59175d36279d71596e64d7bb65596f}{set\+Chart\+Style}} 
\end{DoxySeeAlso}
\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{cs\+Ohlc@{cs\+Ohlc}!Q\+C\+P\+Financial@{Q\+C\+P\+Financial}}\index{Q\+C\+P\+Financial@{Q\+C\+P\+Financial}!cs\+Ohlc@{cs\+Ohlc}}}\mbox{\Hypertarget{class_q_c_p_financial_a0f800e21ee98d646dfc6f8f89d10ebfba3a516016c9298d3e95dd82aa203c4390}\label{class_q_c_p_financial_a0f800e21ee98d646dfc6f8f89d10ebfba3a516016c9298d3e95dd82aa203c4390}} 
cs\+Ohlc&Open-\/\+High-\/\+Low-\/\+Close bar representation. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{cs\+Candlestick@{cs\+Candlestick}!Q\+C\+P\+Financial@{Q\+C\+P\+Financial}}\index{Q\+C\+P\+Financial@{Q\+C\+P\+Financial}!cs\+Candlestick@{cs\+Candlestick}}}\mbox{\Hypertarget{class_q_c_p_financial_a0f800e21ee98d646dfc6f8f89d10ebfbac803cbd39f26e3f206bcc7028679e62f}\label{class_q_c_p_financial_a0f800e21ee98d646dfc6f8f89d10ebfbac803cbd39f26e3f206bcc7028679e62f}} 
cs\+Candlestick&Candlestick representation. \\
\hline

\end{DoxyEnumFields}


\subsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{class_q_c_p_financial_a4702d5248feeb9d1ec6e3ce725b10b32}\label{class_q_c_p_financial_a4702d5248feeb9d1ec6e3ce725b10b32}} 
\index{Q\+C\+P\+Financial@{Q\+C\+P\+Financial}!Q\+C\+P\+Financial@{Q\+C\+P\+Financial}}
\index{Q\+C\+P\+Financial@{Q\+C\+P\+Financial}!Q\+C\+P\+Financial@{Q\+C\+P\+Financial}}
\subsubsection{\texorpdfstring{Q\+C\+P\+Financial()}{QCPFinancial()}}
{\footnotesize\ttfamily Q\+C\+P\+Financial\+::\+Q\+C\+P\+Financial (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{class_q_c_p_axis}{Q\+C\+P\+Axis}} $\ast$}]{key\+Axis,  }\item[{\mbox{\hyperlink{class_q_c_p_axis}{Q\+C\+P\+Axis}} $\ast$}]{value\+Axis }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [explicit]}}

Constructs a financial chart which uses {\itshape key\+Axis} as its key axis (\char`\"{}x\char`\"{}) and {\itshape value\+Axis} as its value axis (\char`\"{}y\char`\"{}). {\itshape key\+Axis} and {\itshape value\+Axis} must reside in the same \mbox{\hyperlink{class_q_custom_plot}{Q\+Custom\+Plot}} instance and not have the same orientation. If either of these restrictions is violated, a corresponding message is printed to the debug output (q\+Debug), the construction is not aborted, though.

The constructed \mbox{\hyperlink{class_q_c_p_financial}{Q\+C\+P\+Financial}} can be added to the plot with \mbox{\hyperlink{class_q_custom_plot_ab7ad9174f701f9c6f64e378df77927a6}{Q\+Custom\+Plot\+::add\+Plottable}}, \mbox{\hyperlink{class_q_custom_plot}{Q\+Custom\+Plot}} then takes ownership of the financial chart. 

\subsection{Member Function Documentation}
\mbox{\Hypertarget{class_q_c_p_financial_a1a83396f97fcc68f2b7aa8d9782feffe}\label{class_q_c_p_financial_a1a83396f97fcc68f2b7aa8d9782feffe}} 
\index{Q\+C\+P\+Financial@{Q\+C\+P\+Financial}!add\+Data@{add\+Data}}
\index{add\+Data@{add\+Data}!Q\+C\+P\+Financial@{Q\+C\+P\+Financial}}
\subsubsection{\texorpdfstring{add\+Data()}{addData()}\hspace{0.1cm}{\footnotesize\ttfamily [1/4]}}
{\footnotesize\ttfamily void Q\+C\+P\+Financial\+::add\+Data (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{qcustomplot_8h_a745c09823fae0974b50beca9bc3b3d7d}{Q\+C\+P\+Financial\+Data\+Map}} \&}]{data\+Map }\end{DoxyParamCaption})}

Adds the provided data points in {\itshape data\+Map} to the current data.

Alternatively, you can also access and modify the data via the \mbox{\hyperlink{class_q_c_p_financial_a528c81578e4f25999a9169127763cfd4}{data}} method, which returns a pointer to the internal \mbox{\hyperlink{qcustomplot_8h_a745c09823fae0974b50beca9bc3b3d7d}{Q\+C\+P\+Financial\+Data\+Map}}.

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_q_c_p_financial_a048c741d3c8cc5709c2c44b759fdf27c}{remove\+Data}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{class_q_c_p_financial_a3b6144b48a6a8e63236fc5bf70d40c00}\label{class_q_c_p_financial_a3b6144b48a6a8e63236fc5bf70d40c00}} 
\index{Q\+C\+P\+Financial@{Q\+C\+P\+Financial}!add\+Data@{add\+Data}}
\index{add\+Data@{add\+Data}!Q\+C\+P\+Financial@{Q\+C\+P\+Financial}}
\subsubsection{\texorpdfstring{add\+Data()}{addData()}\hspace{0.1cm}{\footnotesize\ttfamily [2/4]}}
{\footnotesize\ttfamily void Q\+C\+P\+Financial\+::add\+Data (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{class_q_c_p_financial_data}{Q\+C\+P\+Financial\+Data}} \&}]{data }\end{DoxyParamCaption})}

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Adds the provided single data point in {\itshape data} to the current data.

Alternatively, you can also access and modify the data via the \mbox{\hyperlink{class_q_c_p_financial_a528c81578e4f25999a9169127763cfd4}{data}} method, which returns a pointer to the internal \mbox{\hyperlink{class_q_c_p_financial_data}{Q\+C\+P\+Financial\+Data}}.

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_q_c_p_financial_a048c741d3c8cc5709c2c44b759fdf27c}{remove\+Data}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{class_q_c_p_financial_a688bbd052e00a02954ddb0068b378170}\label{class_q_c_p_financial_a688bbd052e00a02954ddb0068b378170}} 
\index{Q\+C\+P\+Financial@{Q\+C\+P\+Financial}!add\+Data@{add\+Data}}
\index{add\+Data@{add\+Data}!Q\+C\+P\+Financial@{Q\+C\+P\+Financial}}
\subsubsection{\texorpdfstring{add\+Data()}{addData()}\hspace{0.1cm}{\footnotesize\ttfamily [3/4]}}
{\footnotesize\ttfamily void Q\+C\+P\+Financial\+::add\+Data (\begin{DoxyParamCaption}\item[{double}]{key,  }\item[{double}]{open,  }\item[{double}]{high,  }\item[{double}]{low,  }\item[{double}]{close }\end{DoxyParamCaption})}

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Adds the provided single data point given by {\itshape key}, {\itshape open}, {\itshape high}, {\itshape low}, and {\itshape close} to the current data.

Alternatively, you can also access and modify the data via the \mbox{\hyperlink{class_q_c_p_financial_a528c81578e4f25999a9169127763cfd4}{data}} method, which returns a pointer to the internal \mbox{\hyperlink{class_q_c_p_financial_data}{Q\+C\+P\+Financial\+Data}}.

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_q_c_p_financial_a048c741d3c8cc5709c2c44b759fdf27c}{remove\+Data}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{class_q_c_p_financial_aa1abe3bdafb297497f09cdbdc4db3958}\label{class_q_c_p_financial_aa1abe3bdafb297497f09cdbdc4db3958}} 
\index{Q\+C\+P\+Financial@{Q\+C\+P\+Financial}!add\+Data@{add\+Data}}
\index{add\+Data@{add\+Data}!Q\+C\+P\+Financial@{Q\+C\+P\+Financial}}
\subsubsection{\texorpdfstring{add\+Data()}{addData()}\hspace{0.1cm}{\footnotesize\ttfamily [4/4]}}
{\footnotesize\ttfamily void Q\+C\+P\+Financial\+::add\+Data (\begin{DoxyParamCaption}\item[{const Q\+Vector$<$ double $>$ \&}]{key,  }\item[{const Q\+Vector$<$ double $>$ \&}]{open,  }\item[{const Q\+Vector$<$ double $>$ \&}]{high,  }\item[{const Q\+Vector$<$ double $>$ \&}]{low,  }\item[{const Q\+Vector$<$ double $>$ \&}]{close }\end{DoxyParamCaption})}

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Adds the provided open/high/low/close data to the current data.

Alternatively, you can also access and modify the data via the \mbox{\hyperlink{class_q_c_p_financial_a528c81578e4f25999a9169127763cfd4}{data}} method, which returns a pointer to the internal \mbox{\hyperlink{class_q_c_p_financial_data}{Q\+C\+P\+Financial\+Data}}.

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_q_c_p_financial_a048c741d3c8cc5709c2c44b759fdf27c}{remove\+Data}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{class_q_c_p_financial_a11fd49928c33e55e27b7319c6927864a}\label{class_q_c_p_financial_a11fd49928c33e55e27b7319c6927864a}} 
\index{Q\+C\+P\+Financial@{Q\+C\+P\+Financial}!clear\+Data@{clear\+Data}}
\index{clear\+Data@{clear\+Data}!Q\+C\+P\+Financial@{Q\+C\+P\+Financial}}
\subsubsection{\texorpdfstring{clear\+Data()}{clearData()}}
{\footnotesize\ttfamily void Q\+C\+P\+Financial\+::clear\+Data (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}

Removes all data points.

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_q_c_p_financial_a048c741d3c8cc5709c2c44b759fdf27c}{remove\+Data}}, \mbox{\hyperlink{class_q_c_p_financial_aa0fcd357005288c833a230c7874825ba}{remove\+Data\+After}}, \mbox{\hyperlink{class_q_c_p_financial_a097c0383c7c1e9042ca7f93cb439d15a}{remove\+Data\+Before}} 
\end{DoxySeeAlso}


Implements \mbox{\hyperlink{class_q_c_p_abstract_plottable_a86e5b8fd4b6ff4f4084e7ea4c573fc53}{Q\+C\+P\+Abstract\+Plottable}}.

\mbox{\Hypertarget{class_q_c_p_financial_a528c81578e4f25999a9169127763cfd4}\label{class_q_c_p_financial_a528c81578e4f25999a9169127763cfd4}} 
\index{Q\+C\+P\+Financial@{Q\+C\+P\+Financial}!data@{data}}
\index{data@{data}!Q\+C\+P\+Financial@{Q\+C\+P\+Financial}}
\subsubsection{\texorpdfstring{data()}{data()}}
{\footnotesize\ttfamily \mbox{\hyperlink{qcustomplot_8h_a745c09823fae0974b50beca9bc3b3d7d}{Q\+C\+P\+Financial\+Data\+Map}} $\ast$ Q\+C\+P\+Financial\+::data (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}

Returns a pointer to the internal data storage of type \mbox{\hyperlink{qcustomplot_8h_a745c09823fae0974b50beca9bc3b3d7d}{Q\+C\+P\+Financial\+Data\+Map}}. You may use it to directly manipulate the data, which may be more convenient and faster than using the regular \mbox{\hyperlink{class_q_c_p_financial_adf12a86082f1e488df6a4e8603f8fd6d}{set\+Data}} or \mbox{\hyperlink{class_q_c_p_financial_a1a83396f97fcc68f2b7aa8d9782feffe}{add\+Data}} methods, in certain situations. \mbox{\Hypertarget{class_q_c_p_financial_a048c741d3c8cc5709c2c44b759fdf27c}\label{class_q_c_p_financial_a048c741d3c8cc5709c2c44b759fdf27c}} 
\index{Q\+C\+P\+Financial@{Q\+C\+P\+Financial}!remove\+Data@{remove\+Data}}
\index{remove\+Data@{remove\+Data}!Q\+C\+P\+Financial@{Q\+C\+P\+Financial}}
\subsubsection{\texorpdfstring{remove\+Data()}{removeData()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily void Q\+C\+P\+Financial\+::remove\+Data (\begin{DoxyParamCaption}\item[{double}]{from\+Key,  }\item[{double}]{to\+Key }\end{DoxyParamCaption})}

Removes all data points with keys between {\itshape from\+Key} and {\itshape to\+Key}. if {\itshape from\+Key} is greater or equal to {\itshape to\+Key}, the function does nothing. To remove a single data point with known key, use \mbox{\hyperlink{class_q_c_p_financial_ae527d8a11290906b083d1ab598c380ea}{remove\+Data(double key)}}.

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_q_c_p_financial_a1a83396f97fcc68f2b7aa8d9782feffe}{add\+Data}}, \mbox{\hyperlink{class_q_c_p_financial_a11fd49928c33e55e27b7319c6927864a}{clear\+Data}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{class_q_c_p_financial_ae527d8a11290906b083d1ab598c380ea}\label{class_q_c_p_financial_ae527d8a11290906b083d1ab598c380ea}} 
\index{Q\+C\+P\+Financial@{Q\+C\+P\+Financial}!remove\+Data@{remove\+Data}}
\index{remove\+Data@{remove\+Data}!Q\+C\+P\+Financial@{Q\+C\+P\+Financial}}
\subsubsection{\texorpdfstring{remove\+Data()}{removeData()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily void Q\+C\+P\+Financial\+::remove\+Data (\begin{DoxyParamCaption}\item[{double}]{key }\end{DoxyParamCaption})}

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Removes a single data point at {\itshape key}. If the position is not known with absolute precision, consider using \mbox{\hyperlink{class_q_c_p_financial_a048c741d3c8cc5709c2c44b759fdf27c}{remove\+Data(double from\+Key, double to\+Key)}} with a small fuzziness interval around the suspected position, depeding on the precision with which the key is known.

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_q_c_p_financial_a1a83396f97fcc68f2b7aa8d9782feffe}{add\+Data}}, \mbox{\hyperlink{class_q_c_p_financial_a11fd49928c33e55e27b7319c6927864a}{clear\+Data}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{class_q_c_p_financial_aa0fcd357005288c833a230c7874825ba}\label{class_q_c_p_financial_aa0fcd357005288c833a230c7874825ba}} 
\index{Q\+C\+P\+Financial@{Q\+C\+P\+Financial}!remove\+Data\+After@{remove\+Data\+After}}
\index{remove\+Data\+After@{remove\+Data\+After}!Q\+C\+P\+Financial@{Q\+C\+P\+Financial}}
\subsubsection{\texorpdfstring{remove\+Data\+After()}{removeDataAfter()}}
{\footnotesize\ttfamily void Q\+C\+P\+Financial\+::remove\+Data\+After (\begin{DoxyParamCaption}\item[{double}]{key }\end{DoxyParamCaption})}

Removes all data points with keys greater than {\itshape key}.

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_q_c_p_financial_a1a83396f97fcc68f2b7aa8d9782feffe}{add\+Data}}, \mbox{\hyperlink{class_q_c_p_financial_a11fd49928c33e55e27b7319c6927864a}{clear\+Data}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{class_q_c_p_financial_a097c0383c7c1e9042ca7f93cb439d15a}\label{class_q_c_p_financial_a097c0383c7c1e9042ca7f93cb439d15a}} 
\index{Q\+C\+P\+Financial@{Q\+C\+P\+Financial}!remove\+Data\+Before@{remove\+Data\+Before}}
\index{remove\+Data\+Before@{remove\+Data\+Before}!Q\+C\+P\+Financial@{Q\+C\+P\+Financial}}
\subsubsection{\texorpdfstring{remove\+Data\+Before()}{removeDataBefore()}}
{\footnotesize\ttfamily void Q\+C\+P\+Financial\+::remove\+Data\+Before (\begin{DoxyParamCaption}\item[{double}]{key }\end{DoxyParamCaption})}

Removes all data points with keys smaller than {\itshape key}.

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_q_c_p_financial_a1a83396f97fcc68f2b7aa8d9782feffe}{add\+Data}}, \mbox{\hyperlink{class_q_c_p_financial_a11fd49928c33e55e27b7319c6927864a}{clear\+Data}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{class_q_c_p_financial_a77bffad8f3fcbcccbef03ead1c538e3a}\label{class_q_c_p_financial_a77bffad8f3fcbcccbef03ead1c538e3a}} 
\index{Q\+C\+P\+Financial@{Q\+C\+P\+Financial}!select\+Test@{select\+Test}}
\index{select\+Test@{select\+Test}!Q\+C\+P\+Financial@{Q\+C\+P\+Financial}}
\subsubsection{\texorpdfstring{select\+Test()}{selectTest()}}
{\footnotesize\ttfamily double Q\+C\+P\+Financial\+::select\+Test (\begin{DoxyParamCaption}\item[{const Q\+PointF \&}]{pos,  }\item[{bool}]{only\+Selectable,  }\item[{Q\+Variant $\ast$}]{details = {\ttfamily 0} }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [virtual]}}

This function is used to decide whether a click hits a layerable object or not.

{\itshape pos} is a point in pixel coordinates on the \mbox{\hyperlink{class_q_custom_plot}{Q\+Custom\+Plot}} surface. This function returns the shortest pixel distance of this point to the object. If the object is either invisible or the distance couldn\textquotesingle{}t be determined, -\/1.\+0 is returned. Further, if {\itshape only\+Selectable} is true and the object is not selectable, -\/1.\+0 is returned, too.

If the object is represented not by single lines but by an area like a \mbox{\hyperlink{class_q_c_p_item_text}{Q\+C\+P\+Item\+Text}} or the bars of a \mbox{\hyperlink{class_q_c_p_bars}{Q\+C\+P\+Bars}} plottable, a click inside the area should also be considered a hit. In these cases this function thus returns a constant value greater zero but still below the parent plot\textquotesingle{}s selection tolerance. (typically the selection\+Tolerance multiplied by 0.\+99).

Providing a constant value for area objects allows selecting line objects even when they are obscured by such area objects, by clicking close to the lines (i.\+e. closer than 0.\+99$\ast$selection\+Tolerance).

The actual setting of the selection state is not done by this function. This is handled by the parent \mbox{\hyperlink{class_q_custom_plot}{Q\+Custom\+Plot}} when the mouse\+Release\+Event occurs, and the finally selected object is notified via the select\+Event/deselect\+Event methods.

{\itshape details} is an optional output parameter. Every layerable subclass may place any information in {\itshape details}. This information will be passed to select\+Event when the parent \mbox{\hyperlink{class_q_custom_plot}{Q\+Custom\+Plot}} decides on the basis of this select\+Test call, that the object was successfully selected. The subsequent call to select\+Event will carry the {\itshape details}. This is useful for multi-\/part objects (like \mbox{\hyperlink{class_q_c_p_axis}{Q\+C\+P\+Axis}}). This way, a possibly complex calculation to decide which part was clicked is only done once in \mbox{\hyperlink{class_q_c_p_financial_a77bffad8f3fcbcccbef03ead1c538e3a}{select\+Test}}. The result (i.\+e. the actually clicked part) can then be placed in {\itshape details}. So in the subsequent select\+Event, the decision which part was selected doesn\textquotesingle{}t have to be done a second time for a single selection operation.

You may pass 0 as {\itshape details} to indicate that you are not interested in those selection details.

\begin{DoxySeeAlso}{See also}
select\+Event, deselect\+Event, \mbox{\hyperlink{class_q_custom_plot_a5ee1e2f6ae27419deca53e75907c27e5}{Q\+Custom\+Plot\+::set\+Interactions}} 
\end{DoxySeeAlso}


Implements \mbox{\hyperlink{class_q_c_p_abstract_plottable_a38efe9641d972992a3d44204bc80ec1d}{Q\+C\+P\+Abstract\+Plottable}}.

\mbox{\Hypertarget{class_q_c_p_financial_a8bbdd87629f9144b3ef51af660c0961a}\label{class_q_c_p_financial_a8bbdd87629f9144b3ef51af660c0961a}} 
\index{Q\+C\+P\+Financial@{Q\+C\+P\+Financial}!set\+Brush\+Negative@{set\+Brush\+Negative}}
\index{set\+Brush\+Negative@{set\+Brush\+Negative}!Q\+C\+P\+Financial@{Q\+C\+P\+Financial}}
\subsubsection{\texorpdfstring{set\+Brush\+Negative()}{setBrushNegative()}}
{\footnotesize\ttfamily void Q\+C\+P\+Financial\+::set\+Brush\+Negative (\begin{DoxyParamCaption}\item[{const Q\+Brush \&}]{brush }\end{DoxyParamCaption})}

If \mbox{\hyperlink{class_q_c_p_financial_a138e44aac160a17a9676652e240c5f08}{set\+Two\+Colored}} is set to true, this function controls the brush that is used to draw fills of data points with a negative trend (i.\+e. bars/candlesticks with close $<$ open).

If {\itshape two\+Colored} is false, the normal plottable\textquotesingle{}s pen and brush are used (\mbox{\hyperlink{class_q_c_p_abstract_plottable_ab74b09ae4c0e7e13142fe4b5bf46cac7}{set\+Pen}}, \mbox{\hyperlink{class_q_c_p_abstract_plottable_a7a4b92144dca6453a1f0f210e27edc74}{set\+Brush}}).

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_q_c_p_financial_a5ebff2b1764efd07cc44942e67821829}{set\+Brush\+Positive}}, \mbox{\hyperlink{class_q_c_p_financial_afe5c07e94ccea01a75b3a2476993c346}{set\+Pen\+Negative}}, \mbox{\hyperlink{class_q_c_p_financial_ac58aa3adc7a35aab0088764b840683e5}{set\+Pen\+Positive}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{class_q_c_p_financial_a5ebff2b1764efd07cc44942e67821829}\label{class_q_c_p_financial_a5ebff2b1764efd07cc44942e67821829}} 
\index{Q\+C\+P\+Financial@{Q\+C\+P\+Financial}!set\+Brush\+Positive@{set\+Brush\+Positive}}
\index{set\+Brush\+Positive@{set\+Brush\+Positive}!Q\+C\+P\+Financial@{Q\+C\+P\+Financial}}
\subsubsection{\texorpdfstring{set\+Brush\+Positive()}{setBrushPositive()}}
{\footnotesize\ttfamily void Q\+C\+P\+Financial\+::set\+Brush\+Positive (\begin{DoxyParamCaption}\item[{const Q\+Brush \&}]{brush }\end{DoxyParamCaption})}

If \mbox{\hyperlink{class_q_c_p_financial_a138e44aac160a17a9676652e240c5f08}{set\+Two\+Colored}} is set to true, this function controls the brush that is used to draw fills of data points with a positive trend (i.\+e. bars/candlesticks with close $>$= open).

If {\itshape two\+Colored} is false, the normal plottable\textquotesingle{}s pen and brush are used (\mbox{\hyperlink{class_q_c_p_abstract_plottable_ab74b09ae4c0e7e13142fe4b5bf46cac7}{set\+Pen}}, \mbox{\hyperlink{class_q_c_p_abstract_plottable_a7a4b92144dca6453a1f0f210e27edc74}{set\+Brush}}).

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_q_c_p_financial_a8bbdd87629f9144b3ef51af660c0961a}{set\+Brush\+Negative}}, \mbox{\hyperlink{class_q_c_p_financial_ac58aa3adc7a35aab0088764b840683e5}{set\+Pen\+Positive}}, \mbox{\hyperlink{class_q_c_p_financial_afe5c07e94ccea01a75b3a2476993c346}{set\+Pen\+Negative}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{class_q_c_p_financial_a5a59175d36279d71596e64d7bb65596f}\label{class_q_c_p_financial_a5a59175d36279d71596e64d7bb65596f}} 
\index{Q\+C\+P\+Financial@{Q\+C\+P\+Financial}!set\+Chart\+Style@{set\+Chart\+Style}}
\index{set\+Chart\+Style@{set\+Chart\+Style}!Q\+C\+P\+Financial@{Q\+C\+P\+Financial}}
\subsubsection{\texorpdfstring{set\+Chart\+Style()}{setChartStyle()}}
{\footnotesize\ttfamily void Q\+C\+P\+Financial\+::set\+Chart\+Style (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{class_q_c_p_financial_a0f800e21ee98d646dfc6f8f89d10ebfb}{Q\+C\+P\+Financial\+::\+Chart\+Style}}}]{style }\end{DoxyParamCaption})}

Sets which representation style shall be used to display the O\+H\+LC data. \mbox{\Hypertarget{class_q_c_p_financial_adf12a86082f1e488df6a4e8603f8fd6d}\label{class_q_c_p_financial_adf12a86082f1e488df6a4e8603f8fd6d}} 
\index{Q\+C\+P\+Financial@{Q\+C\+P\+Financial}!set\+Data@{set\+Data}}
\index{set\+Data@{set\+Data}!Q\+C\+P\+Financial@{Q\+C\+P\+Financial}}
\subsubsection{\texorpdfstring{set\+Data()}{setData()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily void Q\+C\+P\+Financial\+::set\+Data (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{qcustomplot_8h_a745c09823fae0974b50beca9bc3b3d7d}{Q\+C\+P\+Financial\+Data\+Map}} $\ast$}]{data,  }\item[{bool}]{copy = {\ttfamily false} }\end{DoxyParamCaption})}

Replaces the current data with the provided {\itshape data}.

If {\itshape copy} is set to true, data points in {\itshape data} will only be copied. if false, the plottable takes ownership of the passed data and replaces the internal data pointer with it. This is significantly faster than copying for large datasets.

Alternatively, you can also access and modify the plottable\textquotesingle{}s data via the \mbox{\hyperlink{class_q_c_p_financial_a528c81578e4f25999a9169127763cfd4}{data}} method, which returns a pointer to the internal \mbox{\hyperlink{qcustomplot_8h_a745c09823fae0974b50beca9bc3b3d7d}{Q\+C\+P\+Financial\+Data\+Map}}.

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_q_c_p_financial_a0c3453d1c03e320950fdd2df54e3ebc8}{time\+Series\+To\+Ohlc}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{class_q_c_p_financial_a886881339d6447432af55adaad748c3c}\label{class_q_c_p_financial_a886881339d6447432af55adaad748c3c}} 
\index{Q\+C\+P\+Financial@{Q\+C\+P\+Financial}!set\+Data@{set\+Data}}
\index{set\+Data@{set\+Data}!Q\+C\+P\+Financial@{Q\+C\+P\+Financial}}
\subsubsection{\texorpdfstring{set\+Data()}{setData()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily void Q\+C\+P\+Financial\+::set\+Data (\begin{DoxyParamCaption}\item[{const Q\+Vector$<$ double $>$ \&}]{key,  }\item[{const Q\+Vector$<$ double $>$ \&}]{open,  }\item[{const Q\+Vector$<$ double $>$ \&}]{high,  }\item[{const Q\+Vector$<$ double $>$ \&}]{low,  }\item[{const Q\+Vector$<$ double $>$ \&}]{close }\end{DoxyParamCaption})}

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Replaces the current data with the provided open/high/low/close data. The provided vectors should have equal length. Else, the number of added points will be the size of the smallest vector.

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_q_c_p_financial_a0c3453d1c03e320950fdd2df54e3ebc8}{time\+Series\+To\+Ohlc}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{class_q_c_p_financial_afe5c07e94ccea01a75b3a2476993c346}\label{class_q_c_p_financial_afe5c07e94ccea01a75b3a2476993c346}} 
\index{Q\+C\+P\+Financial@{Q\+C\+P\+Financial}!set\+Pen\+Negative@{set\+Pen\+Negative}}
\index{set\+Pen\+Negative@{set\+Pen\+Negative}!Q\+C\+P\+Financial@{Q\+C\+P\+Financial}}
\subsubsection{\texorpdfstring{set\+Pen\+Negative()}{setPenNegative()}}
{\footnotesize\ttfamily void Q\+C\+P\+Financial\+::set\+Pen\+Negative (\begin{DoxyParamCaption}\item[{const Q\+Pen \&}]{pen }\end{DoxyParamCaption})}

If \mbox{\hyperlink{class_q_c_p_financial_a138e44aac160a17a9676652e240c5f08}{set\+Two\+Colored}} is set to true, this function controls the pen that is used to draw outlines of data points with a negative trend (i.\+e. bars/candlesticks with close $<$ open).

If {\itshape two\+Colored} is false, the normal plottable\textquotesingle{}s pen and brush are used (\mbox{\hyperlink{class_q_c_p_abstract_plottable_ab74b09ae4c0e7e13142fe4b5bf46cac7}{set\+Pen}}, \mbox{\hyperlink{class_q_c_p_abstract_plottable_a7a4b92144dca6453a1f0f210e27edc74}{set\+Brush}}).

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_q_c_p_financial_ac58aa3adc7a35aab0088764b840683e5}{set\+Pen\+Positive}}, \mbox{\hyperlink{class_q_c_p_financial_a8bbdd87629f9144b3ef51af660c0961a}{set\+Brush\+Negative}}, \mbox{\hyperlink{class_q_c_p_financial_a5ebff2b1764efd07cc44942e67821829}{set\+Brush\+Positive}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{class_q_c_p_financial_ac58aa3adc7a35aab0088764b840683e5}\label{class_q_c_p_financial_ac58aa3adc7a35aab0088764b840683e5}} 
\index{Q\+C\+P\+Financial@{Q\+C\+P\+Financial}!set\+Pen\+Positive@{set\+Pen\+Positive}}
\index{set\+Pen\+Positive@{set\+Pen\+Positive}!Q\+C\+P\+Financial@{Q\+C\+P\+Financial}}
\subsubsection{\texorpdfstring{set\+Pen\+Positive()}{setPenPositive()}}
{\footnotesize\ttfamily void Q\+C\+P\+Financial\+::set\+Pen\+Positive (\begin{DoxyParamCaption}\item[{const Q\+Pen \&}]{pen }\end{DoxyParamCaption})}

If \mbox{\hyperlink{class_q_c_p_financial_a138e44aac160a17a9676652e240c5f08}{set\+Two\+Colored}} is set to true, this function controls the pen that is used to draw outlines of data points with a positive trend (i.\+e. bars/candlesticks with close $>$= open).

If {\itshape two\+Colored} is false, the normal plottable\textquotesingle{}s pen and brush are used (\mbox{\hyperlink{class_q_c_p_abstract_plottable_ab74b09ae4c0e7e13142fe4b5bf46cac7}{set\+Pen}}, \mbox{\hyperlink{class_q_c_p_abstract_plottable_a7a4b92144dca6453a1f0f210e27edc74}{set\+Brush}}).

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_q_c_p_financial_afe5c07e94ccea01a75b3a2476993c346}{set\+Pen\+Negative}}, \mbox{\hyperlink{class_q_c_p_financial_a5ebff2b1764efd07cc44942e67821829}{set\+Brush\+Positive}}, \mbox{\hyperlink{class_q_c_p_financial_a8bbdd87629f9144b3ef51af660c0961a}{set\+Brush\+Negative}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{class_q_c_p_financial_a138e44aac160a17a9676652e240c5f08}\label{class_q_c_p_financial_a138e44aac160a17a9676652e240c5f08}} 
\index{Q\+C\+P\+Financial@{Q\+C\+P\+Financial}!set\+Two\+Colored@{set\+Two\+Colored}}
\index{set\+Two\+Colored@{set\+Two\+Colored}!Q\+C\+P\+Financial@{Q\+C\+P\+Financial}}
\subsubsection{\texorpdfstring{set\+Two\+Colored()}{setTwoColored()}}
{\footnotesize\ttfamily void Q\+C\+P\+Financial\+::set\+Two\+Colored (\begin{DoxyParamCaption}\item[{bool}]{two\+Colored }\end{DoxyParamCaption})}

Sets whether this chart shall contrast positive from negative trends per data point by using two separate colors to draw the respective bars/candlesticks.

If {\itshape two\+Colored} is false, the normal plottable\textquotesingle{}s pen and brush are used (\mbox{\hyperlink{class_q_c_p_abstract_plottable_ab74b09ae4c0e7e13142fe4b5bf46cac7}{set\+Pen}}, \mbox{\hyperlink{class_q_c_p_abstract_plottable_a7a4b92144dca6453a1f0f210e27edc74}{set\+Brush}}).

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_q_c_p_financial_ac58aa3adc7a35aab0088764b840683e5}{set\+Pen\+Positive}}, \mbox{\hyperlink{class_q_c_p_financial_afe5c07e94ccea01a75b3a2476993c346}{set\+Pen\+Negative}}, \mbox{\hyperlink{class_q_c_p_financial_a5ebff2b1764efd07cc44942e67821829}{set\+Brush\+Positive}}, \mbox{\hyperlink{class_q_c_p_financial_a8bbdd87629f9144b3ef51af660c0961a}{set\+Brush\+Negative}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{class_q_c_p_financial_a99633f8bac86a61d534ae5eeb1a3068f}\label{class_q_c_p_financial_a99633f8bac86a61d534ae5eeb1a3068f}} 
\index{Q\+C\+P\+Financial@{Q\+C\+P\+Financial}!set\+Width@{set\+Width}}
\index{set\+Width@{set\+Width}!Q\+C\+P\+Financial@{Q\+C\+P\+Financial}}
\subsubsection{\texorpdfstring{set\+Width()}{setWidth()}}
{\footnotesize\ttfamily void Q\+C\+P\+Financial\+::set\+Width (\begin{DoxyParamCaption}\item[{double}]{width }\end{DoxyParamCaption})}

Sets the width of the individual bars/candlesticks to {\itshape width} in plot key coordinates.

A typical choice is to set it to (or slightly less than) one bin interval width. \mbox{\Hypertarget{class_q_c_p_financial_a0c3453d1c03e320950fdd2df54e3ebc8}\label{class_q_c_p_financial_a0c3453d1c03e320950fdd2df54e3ebc8}} 
\index{Q\+C\+P\+Financial@{Q\+C\+P\+Financial}!time\+Series\+To\+Ohlc@{time\+Series\+To\+Ohlc}}
\index{time\+Series\+To\+Ohlc@{time\+Series\+To\+Ohlc}!Q\+C\+P\+Financial@{Q\+C\+P\+Financial}}
\subsubsection{\texorpdfstring{time\+Series\+To\+Ohlc()}{timeSeriesToOhlc()}}
{\footnotesize\ttfamily \mbox{\hyperlink{qcustomplot_8h_a745c09823fae0974b50beca9bc3b3d7d}{Q\+C\+P\+Financial\+Data\+Map}} Q\+C\+P\+Financial\+::time\+Series\+To\+Ohlc (\begin{DoxyParamCaption}\item[{const Q\+Vector$<$ double $>$ \&}]{time,  }\item[{const Q\+Vector$<$ double $>$ \&}]{value,  }\item[{double}]{time\+Bin\+Size,  }\item[{double}]{time\+Bin\+Offset = {\ttfamily 0} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}

A convenience function that converts time series data ({\itshape value} against {\itshape time}) to O\+H\+LC binned data points. The return value can then be passed on to \mbox{\hyperlink{class_q_c_p_financial_adf12a86082f1e488df6a4e8603f8fd6d}{set\+Data}}.

The size of the bins can be controlled with {\itshape time\+Bin\+Size} in the same units as {\itshape time} is given. For example, if the unit of {\itshape time} is seconds and single O\+H\+L\+C/\+Candlesticks should span an hour each, set {\itshape time\+Bin\+Size} to 3600.

{\itshape time\+Bin\+Offset} allows to control precisely at what {\itshape time} coordinate a bin should start. The value passed as {\itshape time\+Bin\+Offset} doesn\textquotesingle{}t need to be in the range encompassed by the {\itshape time} keys. It merely defines the mathematical offset/phase of the bins that will be used to process the data. 

The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
R\+:/\+Develop/a0-\/develop/\+Lib\+Q\+Qt/src/charts/qcustomplot/\mbox{\hyperlink{qcustomplot_8h}{qcustomplot.\+h}}\item 
R\+:/\+Develop/a0-\/develop/\+Lib\+Q\+Qt/src/charts/qcustomplot/\mbox{\hyperlink{qcustomplot_8cpp}{qcustomplot.\+cpp}}\end{DoxyCompactItemize}
